<%@ page pageEncoding="UTF-8"%>
<%@ page import="org.myhomework.entity.Teacher"%>
<%@ page import="java.util.List"%>
<!DOCTYPE html>
<html>
    <head>
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            #blog-login-welcome-title {
                width: 700px;
                margin: 10px auto;
                color: #000;
            }
            #login-container {
                margin: 200px auto;
                border: 1px solid gray;
                width: 700px;
                padding: 10px;
                background-color: rgba(0, 0, 0, 0.3);
            }
            .login-group-item {
                width: 60%;
                margin: 10px auto;
            }
            .login-group-item-label {
                color: #fff;
                width: 20%;
                font-size: 20pt;
            }
            .login-group-item > input {
                display: block;
                height: 25px;
                width: 80%;
                margin-top: 10px;
            }
            .inline {
                display: inline-block;
            }
            #login-button {
                margin-top: 10px;
                width: 120px;
                height: 45px;
                font-size: 15pt;
            }
        </style>
    </head>
    <body>
        <% Teacher teacher = (Teacher) request.getAttribute("teacher"); %>
        <div id="blog-login-welcome-title"><h1>修改信息</h1></div>
        <div id="login-container">
            <form method="post" action="/teacher/change-info?back=<%=request.getAttribute("back")%>">
            <input type="hidden" value="<%=teacher.getId()%>" name="id" />
            <div class="login-group-item">
                <div class="login-group-item-label inline">姓名</div>
                <input type="text" name="name" value="<%=teacher.getName()%>" />
            </div>
            <div class="login-group-item">
                <div class="login-group-item-label inline">年龄</div>
                <input type="number" name="age" value="<%=teacher.getAge()%>" />
            </div>
            <div class="login-group-item">
                <div class="login-group-item-label inline">性别</div>
                <input type="text" name="sex" value="<%=teacher.getSex()%>" />
            </div>
            <div class="login-group-item">
                <div class="login-group-item-label inline">院校</div>
                <input type="text" name="school" value="<%=teacher.getSchool()%>" />
            </div>
            <div class="login-group-item">
                <div class="login-group-item-label inline">教授课程</div>
                <input type="text" name="course"  value="<%=teacher.getCourse()%>" />
            </div>
            <div class="login-group-item">
                <button type="submit" id="login-button">确认</button>
            </div>
            </form>
        </div>
    </body>
</html>